<template>
    <div class="allrec">
        <twoHead title="歌单广场"></twoHead>
        <div class="con">
            <van-tabs v-model="active" offset-top="45px" animated sticky swipeable>
                <van-tab v-for="(v,i) in arr" :key="i" :title="v.name">
                    <myReList :cat="v.name"></myReList>
                </van-tab>
            </van-tabs>
        </div>
    </div>
</template>


<script>
export default {
    data(){
        return {
            active:1,
            arr:[{name:'推荐'},{name:'精品'}],
        }
    },
    mounted(){
        this.active = Number(this.$route.params.i);
        this.$ajax.catlistHot().then(res=>{
            this.arr = [...this.arr,...res.tags];
        })
    }
}
</script>

<style lang="scss" scoped>
.allrec{
    padding-top: 45px;
    padding-bottom: 50px;
}
.con{
    background: #fff;
}
</style>